﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleRest.Core.Extensions.Documentation
{
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
    public class StatusCodeDescriptionAttribute : Attribute
    {
        public string ErrorCode { get; set; }
        public System.Net.HttpStatusCode StatusCode { get; set; }
        public string Description { get; set; }

        public HttpStatusCode GetValue()
        {
            return new HttpStatusCode()
            {
                ErrorCode = this.ErrorCode,
                StatusCode = (int)this.StatusCode,
                Description = this.Description
            };
        }
    }
}
